Optimal. Leaf size=288 \[ -\frac {n p (1-2 n p) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);\sin ^2(e+f x)\right ) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (1+n p) \sqrt {\cos ^2(e+f x)}}+\frac {2 \left (1-n^2 p^2\right ) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (2+n p);\frac {1}{2} (4+n p);\sin ^2(e+f x)\right ) \sin ^2(e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (2+n p) \sqrt {\cos ^2(e+f x)}}+\frac {2 (1-n p) \cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (1+\sin (e+f x))}+\frac {\cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 f (a+a \sin (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 288, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2905, 2845,
3057, 2827, 2722} \begin {gather*} \frac {2 \left (1-n^2 p^2\right ) \sin ^2(e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (n p+2);\frac {1}{2} (n p+4);\sin ^2(e+f x)\right ) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (n p+2) \sqrt {\cos ^2(e+f x)}}-\frac {n p (1-2 n p) \sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (n p+1);\frac {1}{2} (n p+3);\sin ^2(e+f x)\right ) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (n p+1) \sqrt {\cos ^2(e+f x)}}+\frac {2 (1-n p) \sin (e+f x) \cos (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (\sin (e+f x)+1)}+\frac {\sin (e+f x) \cos (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 f (a \sin (e+f x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 2827
Rule 2845
Rule 2905
Rule 3057
Rubi steps
\begin {align*} \int \frac {\left (c (d \sin (e+f x))^p\right )^n}{(a+a \sin (e+f x))^2} \, dx &=\left ((d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n\right ) \int \frac {(d \sin (e+f x))^{n p}}{(a+a \sin (e+f x))^2} \, dx\\ &=\frac {\cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 f (a+a \sin (e+f x))^2}+\frac {\left ((d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n\right ) \int \frac {(d \sin (e+f x))^{n p} (a d (2-n p)+a d n p \sin (e+f x))}{a+a \sin (e+f x)} \, dx}{3 a^2 d}\\ &=\frac {2 (1-n p) \cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (1+\sin (e+f x))}+\frac {\cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 f (a+a \sin (e+f x))^2}+\frac {\left ((d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n\right ) \int (d \sin (e+f x))^{n p} \left (-a^2 d^2 n p (1-2 n p)+2 a^2 d^2 (1-n p) (1+n p) \sin (e+f x)\right ) \, dx}{3 a^4 d^2}\\ &=\frac {2 (1-n p) \cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (1+\sin (e+f x))}+\frac {\cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 f (a+a \sin (e+f x))^2}-\frac {\left (n p (1-2 n p) (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n\right ) \int (d \sin (e+f x))^{n p} \, dx}{3 a^2}+\frac {\left (2 (1-n p) (1+n p) (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n\right ) \int (d \sin (e+f x))^{1+n p} \, dx}{3 a^2 d}\\ &=-\frac {n p (1-2 n p) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);\sin ^2(e+f x)\right ) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (1+n p) \sqrt {\cos ^2(e+f x)}}+\frac {2 \left (1-n^2 p^2\right ) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (2+n p);\frac {1}{2} (4+n p);\sin ^2(e+f x)\right ) \sin ^2(e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (2+n p) \sqrt {\cos ^2(e+f x)}}+\frac {2 (1-n p) \cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 a^2 f (1+\sin (e+f x))}+\frac {\cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{3 f (a+a \sin (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.86, size = 195, normalized size = 0.68 \begin {gather*} \frac {\cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n \left (\frac {n p (-1+2 n p) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1+n p);\frac {1}{2} (3+n p);\sin ^2(e+f x)\right )}{(1+n p) \sqrt {\cos ^2(e+f x)}}+\frac {3-2 n p+(2-2 n p) \sin (e+f x)}{(1+\sin (e+f x))^2}-\frac {2 \left (-1+n^2 p^2\right ) \sqrt {\cos ^2(e+f x)} \, _2F_1\left (\frac {1}{2},1+\frac {n p}{2};2+\frac {n p}{2};\sin ^2(e+f x)\right ) \sec (e+f x) \tan (e+f x)}{2+n p}\right )}{3 a^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.48, size = 0, normalized size = 0.00 \[\int \frac {\left (c \left (d \sin \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +a \sin \left (f x +e \right )\right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (c \left (d \sin {\left (e + f x \right )}\right )^{p}\right )^{n}}{\sin ^{2}{\left (e + f x \right )} + 2 \sin {\left (e + f x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c\,{\left (d\,\sin \left (e+f\,x\right )\right )}^p\right )}^n}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________